//https://www.helloweba.net/javascript/422.html
//配置实例
$(function () {
    $('#date-range0').dateRangePicker();
    $('#date-range1').dateRangePicker(
            {
                startOfWeek: 'monday',
                separator: ' ~ ',
                format: 'DD.MM.YYYY HH:mm',
                autoClose: false,
                time: {
                    enabled: true
                }
            });

    $('#date-range2').dateRangePicker();

    $('#date-range3').dateRangePicker(
            {
                startDate: '2017-05-20'
            });

    $('#date-range4').dateRangePicker(
            {
                startDate: '2017-05-30',
                endDate: '2017-06-10'
            });

    $('#date-range5').dateRangePicker(
            {
                minDays: 3,
                maxDays: 7
            });

    $('#date-range6').dateRangePicker(
            {
                startOfWeek: 'monday'
            });

    $('#date-range7').dateRangePicker(
            {
                getValue: function ()
                {
                    return this.innerHTML;
                },
                setValue: function (s)
                {
                    this.innerHTML = s;
                }
            });

    $('#two-inputs').dateRangePicker(
            {
                separator: ' to ',
                getValue: function ()
                {
                    if ($('#date-range200').val() && $('#date-range201').val())
                        return $('#date-range200').val() + ' to ' + $('#date-range201').val();
                    else
                        return '';
                },
                setValue: function (s, s1, s2)
                {
                    $('#date-range200').val(s1);
                    $('#date-range201').val(s2);
                }
            });

    $('#date-range9').dateRangePicker(
            {
                showShortcuts: false
            });

    $('#date-range10').dateRangePicker(
            {
                autoClose: true
            });

    $('#date-range11').dateRangePicker(
            {
                autoClose: true,
                singleDate: true,
                showShortcuts: false
            });
});